/* GUI CONVERTED from rechkq.p (converter v1.76) Thu Mar 14 08:55:15 2002 */
/* rechkq.p - REPETITIVE                                                      */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                        */
/* All rights reserved worldwide.  This is an unpublished work.               */
/* $Revision: 1.13 $                                                         */
/*V8:ConvertMode=Maintenance                                                  */
/* REVISION: 7.3      LAST MODIFIED: 10/31/94   BY: WUG *GN77*                */
/* REVISION: 8.6E     LAST MODIFIED: 04/14/98   BY: *J2HL* Samir Bavkar       */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan         */
/* REVISION: 9.0      LAST MODIFIED: 04/16/99   BY: *J2DG* Reetu Kapoor       */
/* REVISION: 9.1      LAST MODIFIED: 11/17/99   BY: *N04H* Vivek Gogte        */
/* Old ECO marker removed, but no ECO header exists *F0PN*               */
/* REVISION: 9.1      LAST MODIFIED: 06/28/00   BY: Hemanth Ebenezer *N0DK* */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00   BY: *N0KP* myb                */
/* $Revision: 1.13 $    BY: John Pison            DATE: 03/13/02  ECO: *N1BT*  */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/

/* REPLACED FIND STATEMENTS WITH FOR FIRST                                */
/* STATEMENTS FOR ORACLE PERFORMANCE.                                     */

/* SUBPROGRAM TO CHECK A CHANGE TO A QUEUE QTY THAT WILL CAUSE                */
/* THE QUEUE QTY TO GO NEGATIVE                                               */

{mfdeclre.i}

define input parameter cumwo_lot as character no-undo.
define input parameter op        as integer   no-undo.
define input parameter que_type  as character no-undo.
define input parameter qty_chg   as decimal   no-undo.
define input-output parameter msg_ct as integer no-undo.

{pxmaint.i}

{pxrun.i &PROC='validateQueueQty' &PROGRAM='rewoxr.p'
   &PARAM="(input cumwo_lot,
     input op,
     input que_type,
     input qty_chg)"
   &NOAPPERROR=true
   &CATCHERROR=true
   }

if return-value <> {&SUCCESS-RESULT} then do:

   if que_type = "o" or  que_type = "r" then do:
      bell.
   end.

   if not batchrun then do:
      msg_ct = 0.

      if not {gpiswrap.i} then pause.
   end. /* IF NOT BATCHRUN */
   else
      msg_ct = msg_ct + 1.

end.
